package rocket.client;

import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.UIManager;
import java.awt.SystemColor;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class ClientTrainerHome extends JPanel {
	
	/**
	 * Create the panel.
	 */
	public ClientTrainerHome() {
setLayout(null);
		/*
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon(ClientAdminHome.class.getResource("/rocket/images/employeePage.png")));
		lblNewLabel.setBounds(0, 0, 801, 601);
		add(lblNewLabel);
		*/
		ImagePanel panel = new ImagePanel(new ImageIcon("/rocket/images/employeePage.png").getImage());
		panel.setBounds(0, 0, 800, 600);
		add(panel);
		
		JButton btnRequestAppointments = new JButton("Request Appointment");
		btnRequestAppointments.setBounds(155, 200, 200, 25);
		add(btnRequestAppointments);
		
		JButton btnCreateNewUser = new JButton("Manage Pokemon");
		btnCreateNewUser.setBounds(155, 250, 200, 25);
		add(btnCreateNewUser);
		
		JButton btnLogOut = new JButton("Log Out");
		btnLogOut.setBounds(55, 550, 117, 25);
		add(btnLogOut);
		
		JLabel lblNewLabel_1 = new JLabel("Home");
		lblNewLabel_1.setFont(new Font("Dialog", Font.BOLD, 20));
		lblNewLabel_1.setBounds(340, 12, 70, 25);
		add(lblNewLabel_1);
		
		JButton btnNewButton = new JButton("View Pokemon History");
		btnNewButton.setBounds(155, 300, 200, 25);
		add(btnNewButton);
		
		JButton btnViewAppointments = new JButton("View Appointments");
		btnViewAppointments.setBounds(155, 150, 200, 25);
		add(btnViewAppointments);

	} 

}class ImagePanel extends JPanel {

	  
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Image img;

	  public ImagePanel(String img) {
	    this(new ImageIcon(img).getImage());
	  }

	  public ImagePanel(Image img) {
	    this.img = img;
	    Dimension size = new Dimension(img.getWidth(null), img.getHeight(null));
	    setPreferredSize(size);
	    setMinimumSize(size);
	    setMaximumSize(size);
	    setSize(size);
	    setLayout(null);
	  }

	  public void paintComponent(Graphics g) {
	    g.drawImage(img, 0, 0, null);
	  }

	}
